package com.haoji.upload.common.Value.mvc;

import org.springframework.core.convert.converter.Converter;

/**
 * @program: upload
 * @description:
 * @author: xiaolei
 * @create: 2021-04-15 17:33
 **/
public class StringToNullConverter implements Converter<String,String> {

    @Override
    public String convert(String s) {
        String source = s.trim();
        if ("".equals(source))
            return null;
        else
            return source;
    }
}
